--篷矗山河
local pengchushanhe = fk.CreateSkill {
    name = "mcdh_pengchushanhe",
}

local U = require "packages/utility/utility"
local lib = require "packages/mcdh/lib"

pengchushanhe:addEffect(fk.Damaged,{
    can_trigger = function(self, event, target, player, data)
        return  player:hasSkill(self) and player == target
    end,
    on_use = function(self, event, target, player, data)
        local room = player.room
        local number = math.min(data.from:getHandcardNum(),5)
        player:drawCards(number, self.name)
        number = math.min(data.from:getHandcardNum(),5)
        --不足全弃置
        number = math.min(#player:getCardIds{Player.Hand, Player.Equip},number)
        room:askForDiscard(player, number, 999, true, self.name, false, ".", "#pengchushanhe-discard:::"..number)
    end
})

Fk:loadTranslationTable {
    ["mcdh_pengchushanhe"] = "篷矗山河",
    [":mcdh_pengchushanhe"] = "当你受到伤害后，你可以摸X张牌并至少弃置X张牌。（X为伤害来源的手牌数，至多为5）",
    ["#pengchushanhe-discard"] = "弃置至少 %arg 张牌",
}

return pengchushanhe